﻿Class Application

    ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
    ' can be handled in this file.

    Private Sub Application_DispatcherUnhandledException(ByVal sender As Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) Handles Me.DispatcherUnhandledException
        My.Log.WriteEntry(e.Exception.Message, TraceEventType.Critical)
        MsgBox("please send this file to sgreer@hemsaw.com" & My.Log.DefaultFileLogWriter.FullLogFileName, MsgBoxStyle.Critical)
    End Sub

    Private Sub Application_Startup(ByVal sender As Object, ByVal e As System.Windows.StartupEventArgs) Handles Me.Startup
        My.Log.DefaultFileLogWriter.CustomLocation = My.Computer.FileSystem.SpecialDirectories.Temp
        My.Log.DefaultFileLogWriter.Location = Logging.LogFileLocation.Custom
    End Sub
End Class
